<template>
	<view style="display: grid;grid-template-columns: repeat(3, 1fr);grid-gap: 20rpx;" >
		<u--image  v-for="(k,i) in imageArr" :key="i" @click.native.stop="lookImage(k.url)" :src="k.url" :width="width" :height="height"></u--image>
	</view>
</template>

<script>
	export default {
		name:'commonLookImage',
		props:{
			imageArr: {
				type:Array,
				require:true,
				default:() => []
			},
			width:{
				type:String,
				default:'300px'
			},
			height:{
				type:String,
				default:'100px'
			}
		},
		data() {
			return {}
		},
		methods:{
			lookImage(url) {
				// 预览图片
				uni.previewImage({
					urls: [url],
					longPressActions: {
						itemList: ['保存图片']
					}
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
</style>